Introduction to Literate Programming - Application Assignment
IBM 6400
1 Creating a Variable
1.1 Print X
2 Adding Text in Base R
2.1 Example from R’s help document
2.2 paste()` function, add “and I’m loving it!” to `X`
3 Creating and Modifying a Vector
3.1 Multiply by 2
3.2 Print Y
4 Printing Variables
5 Finding Maximum and Minimum Values
6 Loading ggplot2 and Viewing economics Data
7 Visualizing economics Data
7.1 Variable Descriptions
-
date: Date of data collection -
pce: Personal consumption expenditures (billions) -
pop: Total population (thousands) -
psavert: Personal savings rate (percentage) -
uempmed: Median duration of unemployment (weeks) -
unemploy: Number of unemployed persons (thousands)
7.1.1 Call-Out
Note
Let’s explore unemploy(unemployment numbers) against pop(population), as they are likely correlated.
7.1.2 It’s GGPLOT Time!
8 Replicating the Chart with Pipe Operator
9 Findings and Cross-Reference
What did we learn?
As seen in Figure 1, As the population increases, the number of unemployed individuals also increases. This suggests that unemployment scales with population growth.
10 Formatting and Documentation
😎